﻿using Pattern08桥接模式.Base;
using Pattern08桥接模式.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern08桥接模式
{
    internal class Client
    {
        public void Start()
        {
            Console.WriteLine("顾客A想买大杯加糖的咖啡");
            var largeCupCoffee = new LargeCupCoffee(new SugarCoffee());
            largeCupCoffee.Sale();

            Console.WriteLine("顾客B想买中杯加奶的咖啡");
            var mediumCupCoffee = new MediumCupCoffee(new MilkCoffee());
            mediumCupCoffee.Sale();

            Console.WriteLine("顾客C想买大杯原味的咖啡");
            var largeCupCoffee2 = new LargeCupCoffee(new OriginalCoffee());
            largeCupCoffee2.Sale();

            Console.WriteLine("-----------漂亮的分割线-----------");


            //补充内容

            CupBase cup = new Cup(null);

            cup.SetCoffee(new SugarCoffee());
            cup.Sale();

            cup.SetCoffee(new MilkCoffee());
            cup.Sale();

            cup.SetCoffee(new OriginalCoffee());
            cup.Sale();


        }
    }
}
